import http from '../../utils/http.js'

/* 获取卡信息 */
export function getCardList(){
	return new Promise((resolve,reject)=>{
	    var params={
		   url:'/v1/app/card/list',
		   method:'GET',
		   data:{},
		   callBack:(res)=>{
			if(res.code==0){
			 resolve(res)
			}
			else{
			 reject(res.msg)
			}
		}
	  }
	  http.request(params)
	})
}

export function unbingdingCard(id){
	return new Promise((resolve,reject)=>{
	    var params={
		   url:'/v1/app/card/unbinding',
		   method:'POST',
		   data:{
			   id:id
		   },
		   callBack:(res)=>{
			console.log("解绑回复" + res.code)
			if(res.code==0){
			 resolve(res)
			}
			else{
			 reject(res.msg)
			}
		}
	  }
	  http.request(params)
	})
}